package com.jinghua.treatment.service.impl;

import com.jinghua.treatment.entity.SysNotice;
import com.jinghua.treatment.mapper.SysNoticeMapper;
import com.jinghua.treatment.service.SysNoticeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 王兴光 on 2018/3/30.
 */
@Service("noticeService")
public class SysNoticeServiceImpl implements SysNoticeService {

    @Resource
    private SysNoticeMapper noticeMapper;
    @Override
    @Transactional
    public int insert(SysNotice record) {
        return noticeMapper.insert(record);
    }

    @Override
    public SysNotice selectByPrimaryKey(Integer doctorId) {
        return noticeMapper.selectByDoctorId(doctorId);
    }

    @Override
    public List<SysNotice> selectAll() {
        return noticeMapper.selectAll();
    }

    @Override
    @Transactional
    public int updateByPrimaryKey(SysNotice record) {
        return noticeMapper.updateByPrimaryKey(record);
    }
}
